// Javascrips document
function OnSubmitForm(url) {
    document.appForm.action = url;
	document.appForm.submit();
	return true;
}



function submitEditor(url, id){
	var htmlContent        = $('#'+id+'___Frame').contents().find("#xEditingArea iframe").contents();
	var content            = htmlContent.find("body").html();
    var title         = $('#'+id+'title').attr('value');
   
    //alert(time_content);	
    $.ajax({
		type: "POST",
		url: url,
		data: {title: title, content: content },
		success: function getData(data){
			         $('div#'+id).html(data);
		        }
		//dataType: 'json'
	}); 
	 
}

var checked=false;
function checkedAll() {
    var theForm = document.appForm;
	if(checked == false) {
	    checked = true;
	}else{
	    checked = false;
	}
	
	for(var i = 0; i < theForm.elements.length; i++) {
	    if(theForm.elements[i].name == 'cid[]') {
		    theForm.elements[i].checked = checked;
		}
	}
}